<fieldset>
    <legend>Dados Gerais</legend>
    <input type='hidden' name='data' value="<?php echo date('d/m/Y') ?>" />
    <input type='hidden' name='hora' value="<?php echo date('H:i') ?>" />
    <?php 
    echo $this->fieldList()->open();
    echo $this->fieldList()->text('Data', date('d/m/Y'));
    echo $this->fieldList()->text('Hora', date('H:i'));
    echo $this->fieldList()->textbox('N&ordm; Origem', 'numeroOrigem');
    echo $this->fieldList()->textbox('Observa&ccedil;&atilde;o', 'observacao', null, array('length' => 90, 'class' => 'input_length_medio'));
    echo $this->fieldList()->close();
    ?>
</fieldset>

<fieldset>
    <legend>Processo</legend>
    <?php 
    echo $this->fieldList()->open();
    
    if (!$this->tipoProcesso->tramitacao->isParalela()) {
        echo $this->protocoloSelect('Destino', 
                                    'destino', 
                                    $this->listaProtocolos, 
                                    $this->protocoloOrigemId, 
                                    $this->tipoProcesso->id, 
                                    array('required' => true));
    } else {
    	echo $this->protocoloSelectMultiple('Destinos', 
                                            'destino', 
                                            $this->listaProtocolos, 
                                            $this->protocoloOrigemId, 
                                            $this->tipoProcesso->id, 
                                            array('required' => true));
    }

    echo $this->fieldList()->select('Prioridade', 'prioridadeId', $this->listaPrioridades, null, array('required' => true));
    echo $this->fieldList()->textbox('Data Prazo', 'dataPrazo', null, array('class' => 'mascaraData'));
    
    if (!$this->tipoProcesso->tramitacao->isParalela()) {
        echo $this->protocoloSelectMultiple('Com Cópia', 
                                            'copias', 
                                            $this->listaProtocolos, 
                                            $this->protocoloOrigemId, 
                                            $this->tipoProcesso->id);
    }
    echo $this->fieldList()->textarea('Corpo', 'corpo', null, array('required' => true, 'length' => 5000));
    echo $this->fieldList()->close();
    ?>
</fieldset>

<?php echo $this->render('snippets/formularioProcessoFolhas.phtml') ?>
